<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
</head>
<body>
<h1 th:text="${msg}">默认值</h1>
<h1>选择标签</h1>
<h3 th:if="${age <18}">未成年</h3>
<h3 th:if="${age >= 18}">成年</h3>
<h1>循环</h1>
<ul>
    <li th:each="item : ${list}" th:text="${item}"></li>
</ul>
<table border="1" width="600">
    <thead>
        <tr>
            <th>用户名</th>
            <th>密码</th>
            <th>性别</th>
            <th>年龄</th>
            <th>日期</th>
            <th>出生日期</th>
        </tr>
    </thead>
    <tbody>
        <tr th:each=" user:${userList}">
            <td th:text="${user.getUsername()}"></td>
            <td th:text="${user.getPassword()}"></td>
            <td th:text="${user.getGender()}"></td>
            <td th:text="${user.age}"></td>
            <td th:text="${#dates.format(user.getBirthday(),'yyyy-MM-dd')}"></td>
            <td th:text="${#temporals.format(user.getBirthday2(),'yyyy-MM-dd HH:mm:ss')}"></td>
        </tr>
    </tbody>
</table>
</body>
</html>